import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'main',
      // component: () => import('../views/HomeView.vue'),
      component: () => import('../views/DemoView.vue'),
      redirect: '/demo',
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('../views/HomeView.vue'),
        },
        // {
        //   path: '/three',
        //   name: 'three',
        //   children: [
        //     {
        //       path: '/room',
        //       name: 'room',
        //       component: () => import('../views/Three/RoomThree.vue')
        //     }
        //   ]
        // }
      ]
    },
    {
      path: '/demo',
      name: 'demo',
      component: () => import('../views/DemoView.vue'),
    },
  ]
})

export default router
